package com.free.chat.exception;

import com.free.chat.common.CustomResponse;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author: 朝花不迟暮
 * @Date: 2021/12/23 22:33
 * @Description:
 */
@Getter
@Setter
public class ApiException extends RuntimeException {
    private static final long serialVersionUID = -6690723088958066575L;

    private Integer code;
    private String message;

    public ApiException(String message) {
        this.code = CustomResponse.FAILURE.getCode();
        this.message = message;
    }


    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}